﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
       <script type="text/javascript" src="js/jquery-1.7.1.js"></script>
       <script type="text/javascript" src="js/phonegap.js"></script>
	   <script type="text/javascript" charset="utf-8" src="js/plugins/others/accountlist.js"></script>	 
       <script type="text/javascript" charset="utf-8">
           
           function RetrieveAccount() {
               try
               {

                   accounts = AccountList.get( 
                                function(params){
                                    alert('yes');
                                },
                                function(success){
                                    alert('I have success');
                                },
                                function(fail){
                                    alert('i have failure');
                                }
                                )

                 
               
                  // accounts = window.plugins.AccountList.getAccounts();
                  //// accounts = AccountList.getAccounts();
                  // for (i = 0; i < accounts.length; i++) {
                  //      alert( accounts[i]);
                  // }
               }
               catch (err) {
                   alert(err);
               }
           }
         
           var accounts;
           function onBodyLoad() {
               document.addEventListener("deviceready", onDeviceReady, false);
           }
           /* PhoneGap has been initialized and is ready to roll */
           function onDeviceReady() {
               phoneGapReady.innerHTML = "PhoneGap is Ready";
               //accounts = AccountList.install();
           }
        </script>
</head>
<body onload="onBodyLoad()">

    <div id="details">

    </div>
    <button id="button_details" onclick="RetrieveAccount()" title="Get Accounts">Get Accounts</button>
</body>
</html>
